﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataCollect
{
    internal class SqlSugarHelper
    {
        public static SqlSugarScope Db = new SqlSugarScope(new ConnectionConfig()
        {
            ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.7.226.51)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=MESDB)));User Id=ZQMES_SDQC; Password=XHZQ;",
            DbType = DbType.Oracle,
            IsAutoCloseConnection = true
        }, db => { db.Aop.OnLogExecuting = (sql, pars) => { LogUtils.Info(UtilMethods.GetNativeSql(sql, pars)); }; });
    }
}
